package com.hainatong.shiphelper.module.handlejob.adapter;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.viewholder.BaseDataBindingHolder;
import com.hainatong.shiphelper.R;
import com.hainatong.shiphelper.databinding.ItemMyJobHandleViewBinding;
import com.hainatong.shiphelper.module.handlejob.entity.HandleInfoBean;
import org.jetbrains.annotations.NotNull;

public class MyHandleInfoAdapter extends BaseQuickAdapter<HandleInfoBean , BaseDataBindingHolder<ItemMyJobHandleViewBinding>>
{
    public MyHandleInfoAdapter()
    {
        super(R.layout.item_my_job_handle_view);
    }

    @Override
    protected void convert(@NotNull BaseDataBindingHolder<ItemMyJobHandleViewBinding> bindingHolder, HandleInfoBean handleInfoBean)
    {
        ItemMyJobHandleViewBinding binding = bindingHolder.getDataBinding();
        if( binding != null )
        {
            binding.setHandleInfo( handleInfoBean );
            binding.executePendingBindings();
        }
    }
}
